﻿using System;
using System.Windows.Forms;
using Autodesk.Revit.Attributes;
using Autodesk.Revit.DB;
using Autodesk.Revit.UI;

namespace HyCommonTableTool
{
	[Transaction(TransactionMode.Manual)]
	public class CmdCommonTableTool : IExternalCommand
	{
		public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements)
		{
			DlgHyCommonTableTool dlgHyCommonTableTool = new DlgHyCommonTableTool(true);
			if (dlgHyCommonTableTool.ShowDialog() == DialogResult.OK)
			{
				new GridToolExportImportRevit(commandData, dlgHyCommonTableTool.grid1, "", 7, 2, CREATENEWVIEW.NONE).DrawInRevitView();
			}
			return Autodesk.Revit.UI.Result.Succeeded;
		}
	}
}
